var t = require("../../../@babel/runtime/helpers/defineProperty"), e = getApp();

Page({
    data: {
        money: "",
        order_id: "",
        diyShow: !1,
        diyform: {
            form_id: "",
            diyform_data_id: "",
            pre_id: ""
        }
    },
    onLoad: function(e) {
        console.log(e);
        var o = wx.getStorageSync("langIndex");
        this.setData({
            language: o.en
        }), e.from_id && this.setData(t({}, "diyform.form_id", e.from_id)), e.price && this.setData({
            money: e.price
        }), console.log(this.data.diyform);
    },
    traCheckedData: function(t) {
        var e = t.detail.diyform_data_id;
        console.log(t), e && (this.setData({
            diyShow: !1
        }), this.getdata(e));
    },
    tapList: function() {
        wx.navigateTo({
            url: "/packageH/reserveFunds/getlist/getlist"
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    showDiyClose: function() {
        this.setData({
            diyShow: !1
        });
    },
    toPacketList: function() {
        this.setData({
            diyShow: !0
        });
    },
    getdata: function(t) {
        var o = this, a = {
            from_data_id: t,
            price: o.data.money
        }, n = e.getNetAddresss("plugin.reserve-fund.api.Income.updateReceiveBonus");
        e._getNetWork({
            url: n,
            data: a,
            success: function(t) {
                var e = t.data;
                1 == e.result ? o.setData({
                    money: 0
                }) : wx.showToast({
                    icon: "none",
                    title: e.msg,
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    }
});